<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.sql.*"%>
<%@page import="java.util.*"%>
<%@ page import="java.net.URLEncoder"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<jsp:useBean id="db" class="ctm.javacode.dbBean" />

<html>
<head>

</head>
<body>
	<%
		/******設定******/
		response.setContentType("text/html");
		response.setCharacterEncoding("UTF-8");
		db.setDataSource("jdbc/ctmpllab");
		db.Connected();

		String type = request.getParameter("type");
		String keywordClass = "";
		String keywordClass_2 = "";
		if (type.equals("症狀類別")) {

			keywordClass = "object";
			keywordClass_2 = "object,value";

		} else if (type.equals("症狀屬性")) {

			keywordClass = "property";
			

		} else {

			keywordClass = "value";
			keywordClass_2 = "object,value";

		}
		/******設定******/

		String sqlQuery = "SELECT * FROM standard_table where (class = '"
				+ keywordClass + "'or class = '"+keywordClass_2+"')";
		ResultSet rs;
		rs = db.ExcuteQuery(sqlQuery);

		while (rs.next()) {

			try {
	%>
	
	
	
	<tr>
		<td width="10%"></td>
		<td width="5%"><input name="radio_1" type="radio"
			value="<%=rs.getString("id")%>#<%=rs.getString("name")%>#<%=rs.getString("parent_id")%>#<%=rs.getString("class")%>"></input>
		</td>
		<td width="5%"><%=rs.getString("id")%></td>
		<td width="15%"><%=rs.getString("name")%></td>
		<td width="15%"><%=rs.getString("parent_id")%></td>
		<td><%=rs.getString("class")%></td>
		<td></td>
	</tr>

	<%
		} catch (SQLException e) {
				throw new SQLException(e);
			} // end try-catch
		}

		db.CloseConn();
	%>



</body>
</html>